﻿using System;
using System.Collections.Generic;
using System.Text;
using T.FAS.Runtime.Base.Entity;
using T.FAS.Runtime.Metadata.Entity;

namespace T.FAS.Runtime.DataAccess.SPI
{
    public interface IUpdateService<T> : IDataAccessAtion where T : class
    {
        /// <summary>
        /// 更新CDO数据
        /// </summary>
        /// <param name="metadata">元数据</param>
        /// <param name="exrParams">通用结果对象</param>
        TResult UpdateData(T metadata, TRecord data, Dictionary<string, object> exrParams = null);

        /// <summary>
        /// 更新CDO数据
        /// </summary>
        /// <param name="metadata">元数据</param>
        /// <param name="childNodeId">节点ID</param>
        /// <param name="exrParams">通用结果对象</param>
        TResult UpdateData(T metadata, string childNodeId, TRecord data, Dictionary<string, object> exrParams = null);

        /// <summary>
        /// 更新CDO数据
        /// </summary>
        /// <param name="metadata">元数据</param>
        /// <param name="data"> </param>
        /// <param name="exrParams"></param>
        BatchUpdateResult BatchUpdateData(T metadata, List<TRecord> data, Dictionary<string, object> exrParams = null);
    }
}
